import request from "../utils/reuqest";
//获取所有的角色
export const api_role_query=()=>request.get("roles");
//给角色分配权限
export const api_serRight=(data)=>request.post(`roles/${data.roleId}/rights`,data)
//删除角色权限
export const api_dalteRight=({roleId,rightId})=>request.delte(`roles/${roleId}/rights/${rightId}`)

//添加角色
export const api_rolestj=(data)=>request.post("roles",data)
//删除角色
export const api_deleting=(data)=>request.delte(`roles/${data.id}`,data);
//角色编辑
export const api_update=(data)=>request.put(`roles/${data.id}`,data)